求高手`用VB或C语言编个2009年的日历````

来源:百度知道 编辑:UC知道 时间:2024/05/26 02:28:49

#include <sio.h>
#include<conio.h>
#include<slib.h>
int IsLeapYear(int);
void main()
{
int i;
int day;
int year;
int temp;
int temp_i;
long int Year_days = 0;
int Year_Start = 1;
int Per_Year_Days;
int month_day[]={31,28,31,30,31,30,31,31,30,31,30,31,29};

printf("Please enter the year: ");
scanf("%d",&year);

while(Year_Start < year)
{
if( IsLeapYear( Year_Start ) )
Per_Year_Days = 366;
else
Per_Year_Days = 365;

Year_days = Year_days Per_Year_Days;
Year_Start ;
}

for( temp = 1; temp <=12; temp )
{
switch( temp )
{
case 1:
printf(" January(%d)\n",year);
break;
case 2:
printf(" February(%d)\n",year);
break;
case 3:
printf(" March(%d)\n",year);
break;
case 4:
printf(" April(%